<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>延迟显示 HTML 元素</title>
</head>

<body>
    <div id="change" class="change">
        <h1>Hello, World!</h1>
        <h1 style="display: none;">Hello, Vue!</h1>
    </div>

    <script>
        // 伪元素选择器
        let element = document.querySelector("#change > h1:nth-child(2)")
        console.log(element);

        setTimeout(
            () => {
                // element.style.display = "inline"
                // element.style.display = "block"
                element.removeAttribute("style")
            },
            3000
        )



    </script>
</body>

</html>